<template>
  <a-config-provider
    :locale="zhCN"
    :theme="{
      token: {
        colorPrimary: '#29CE92',
        colorTextBase: '#191a1a',
      },
      components: {
        Radio: {
          colorPrimary: '#29CE92',
        },
      },
    }"
    :renderEmpty="tableEmptyRender"
  >
    <router-view />
  </a-config-provider>
</template>

<script setup>
import { defineAsyncComponent, h, onBeforeMount, onMounted } from "vue";
import zhCN from "ant-design-vue/es/locale/zh_CN";
import dayjs from "dayjs";
import UTC from "dayjs/plugin/utc";
import "dayjs/locale/zh-cn";
dayjs.extend(UTC);
dayjs.locale("zh-cn");
import { useBaseStore } from "/@/store/base/baseStore";
const baseStore = useBaseStore();
onBeforeMount(async () => {
  const user = {};
  baseStore.handleSetUserInfo(user);
});

const ErrorView = defineAsyncComponent(() =>
  import("/@/components/error/index.vue")
);

const tableEmptyRender = () => {
  return h(ErrorView, { width: "140px" });
};
</script>

<style lang="scss" scoped></style>
